

package com.scs.application.modules.upms.entity;

import com.baomidou.mybatisplus.annotation.TableName;
import com.scs.application.core.model.DataEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import lombok.experimental.Accessors;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotBlank;
import java.io.Serializable;
/**
* 编号规则主体实体对象
*/
@TableName("serial_owner")
@Data
@EqualsAndHashCode(callSuper = false)
@ToString(callSuper = true)
@Accessors(chain = true)
public class SerialOwner extends DataEntity  implements Serializable {

    /** 规则编码 */
    @NotBlank(message = "规则编码不能为空")
    @Length(min = 1, max = 32, message = "规则编码长度必须介于 1 和 32 之间")
    private String ruleId;

    /** 所属对象 */
    @NotBlank(message = "所属对象不能为空")
    @Length(min = 1, max = 30, message = "所属对象长度必须介于 1 和 30 之间")
    private String target;

    /** 当前编号 */
    @Length(max = 30, message = "当前编号长度必须介于 0 和 30 之间")
    private String currentCode;

}
